import LoadUserInfo from "./pages/LoadUserInfo";
import { useUserInfo } from "./store";

const App = () => {
  const { userInfo, loading } = useUserInfo();
  return (
    <div style={{ display: "flex", justifyContent: "center", alignItems: "center" }}>
      <div>
        <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ID: {userInfo.id}</div>
        <div>用户名: {userInfo.name}</div>
        <div>手机号: {userInfo.phone}</div>
        {loading && <div>加载中请稍等...</div>}
        <LoadUserInfo></LoadUserInfo>
      </div>
    </div>
  );
};

export default App;
